package com.tengju.user.domain.model.survey;

import com.tengju.user.domain.model.sign.StarSignStatus;
import lombok.AllArgsConstructor;

@AllArgsConstructor
public enum MsgType {

    BASIC(1,"基本信息"),
    NOT_REQUIRED(2,"其他信息");

    private Integer val;
    private String desc;

    public Integer getVal() {
        return val;
    }

    public String getDesc() {
        return desc;
    }


    public static MsgType fromVal(Integer val) {

        if(val == null) {
            return null;
        }

        for (MsgType type : values()) {
            if (type.val.equals(val)) {
                return type;
            }
        }
        return null;
    }
}
